<?php
class C_reminder extends CI_Controller {
	function __construct(){
		parent::__construct();
		checkLogin();
		$this->load->model('m_reminder');
	}
	function index(){
		$task = secure_post('task');
		switch($task){
			case 'LIST1' :
				$this->_list1();
				break;
			case 'LIST2' :
				$this->_list2();
				break;
			default :
				$data["data_m_cabang_id"] = $this->m_reminder->getDataCabang();
				$data["data_m_proyek_jenis"] = array("","Reguler","JO");
				$data["data_proyek_sumberdana"] = array("","APBN", "APBD", "Swasta");
				$data["data_proyek_jeniskontrak"] = array("","Lump Sum", "Unit Price", "Gabungan", "Turn Key");
				$this->load->view('v_reminder',$data);
		}
	}
	
	function _list1(){
		$data['page'] = numeric_post("page");
		$data['rows'] = numeric_post("rows");
		echo $this->m_reminder->_list1($data);
	}
	
	function _list2(){
		$data['page'] = numeric_post("page");
		$data['rows'] = numeric_post("rows");
		echo $this->m_reminder->_list2($data);
	}
}